/**
 * @作者:黎谢之
 * @创建时间：2021/7/7
 * @修改时间：2021/7/10
 */
package com.example.senior_bug.controller;

import com.example.senior_bug.ToolClass.Result;
import com.example.senior_bug.Service.BrandService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@CrossOrigin
@RequestMapping("/Brand")
public class BrandController {
    @Autowired
    private BrandService brandService;

    //用户二级页面获取三级分类列表
    @RequestMapping("/getList")
    public Result GetBrandsByCategory(@RequestParam(required = true) String CategoryName) {
        return brandService.GetBrandsByCategory(CategoryName);
    }

}
